let menuinfoModel = require("../../model/auth/menuTable");
let menuinfoService = {
  add: (info) => {
    return menuinfoModel.insertMany([info]);
  },
  query: (info) => {
    return menuinfoModel.find(info).sort({ index: -1 });
  },
  delete: (info) => {
    return menuinfoModel.remove(info);
  },
  update: (info) => {
    return menuinfoModel.updateOne({ _id: info._id }, info);

  },
};
module.exports = menuinfoService;
